We are going to look at instacart dataset.
library(tidyverse)
library(p8105.datasets)
library(plotly)
data("instacart")
Among all department, when do customers usually place an order within a day?
y <- list(
title = "Hour of a day"
)
instacart %>%
plot_ly(x = ~department, y = ~order_hour_of_day, type = "box") %>%
layout(yaxis = y)